home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk13 / mg2a / amiga.doc next >
Text File  |  1995-03-18  |  20KB  |  502 lines

  1.  
  2.             Amiga MG 2a Release Notes
  3.             -------------------------
  4.  
  5.    This file attempts to document the Amiga-specific features of MG 2a.
  6. Except where otherwise noted.  It is assumed that you already know
  7. about the point and the mark, buffers, windows, extended commands, and
  8. the various areas on the screen that all versions of MG maintain.  If
  9. you don't, see the MG documentation (what there is of it) for more
  10. information. 
  11.  
  12.                   Amiga Credits
  13.                   -------------
  14.  
  15.   The Amiga Intuition terminal driver is the combined effort of Mike
  16. Meyer and Mic Kaczmarczik.  Others who helped and/or inspired good
  17. ideas for the MG terminal driver include Steve Walton, Leon Frenkel,
  18. Marcus Brooks, and Tom Rokicki.  Steve Walton is also responsible for
  19. the dired mode. Lastly, Bob Larson redesigned the MG keymap system,
  20. making it possible for function keys and mouse clicks to be
  21. ``first-class citizens''.
  22.  
  23.                               OPTIONS
  24.                               -------
  25.  
  26.    This section is for people who have their own C compiler. If you
  27. don't have a C compiler, you will hopefully have a version that has
  28. everything compiled into it. 
  29.  
  30.    There are a bewildering variety of extra goodies available as
  31. compile-time options when you construct an Amiga MG. If you select none
  32. of them, you save on disk and memory space, but lose out on some
  33. features and versatility. 
  34.  
  35.    The Makefile provides documentation on these options and what to do
  36. to make them work, but here is a quick overview:
  37.  
  38.    STARTUP -- You can configure MG so that it will look for a startup
  39. file in either the current directory or the AmigaDOS s: (startup)
  40. directory.  An example startup file is included in the distribution,
  41. and also see the STARTUP section below.
  42.  
  43.    MENU -- If this option is used, MG puts an Intuition menu bar with
  44. major editing commands at the top of the screen, just like a "real"
  45. Amiga program. (See the section on the MENU for more info).
  46.  
  47.    BROWSER -- This has got to be seen to be appreciated. The Browser
  48. program turns the menu bar into a way to select files on a disk. First
  49. you select a disk, then a directory on the disk, then a file or
  50. subdirectory on the disk, and so on, all in the menu. 
  51.  
  52.    MOUSE -- This option turns on the Amiga hot mouse.  You can click
  53. on a character and move point to that spot, and that's just the
  54. beginning. (See the MOUSE section for more.)
  55.  
  56.    FKEYS -- This option turns on support for all the extra Amiga
  57. function keys. This enables the HELP key, which runs the function
  58. "describe-key-briefly". Arrow keys work -- shift-arrow keys apply to
  59. words and paragraphs. (See the KEYBOARD section.)
  60.  
  61.    NO_BACKUP -- This is actually a default option; #defining NO_BACKUP
  62. disables backup files.
  63.  
  64.    When chosen, this #define modifies the action of the save-buffer (C-x
  65. C-s) command.  Normally, save-buffer writes out a new copy of the buffer
  66. to disk, thus destroying the contents of the original file.  If BACKUP
  67. is enabled, MG will rename the file to filename~ (with a tilde character
  68. at the end), before the new copy is written out.  This keeps the
  69. next-to-last copy of your file around on disk, so you can recover from
  70. bad mistakes. 
  71.  
  72.    To avoid filling up disk space too quickly, by default MG does *NOT*
  73. make backup files; to do so, enter the command "M-x make-backup-files",
  74. which enables making backup files the next time you enter C-x C-s to
  75. save a file.  If you give an argument to the function (by typing "C-u
  76. M-x make-backup-files", for example), backup files are not made. 
  77.  
  78.    DO_METAKEY -- When this is enabled, Amiga MG uses the ALT key to
  79. implement the META key found on some terminals.  This means that you
  80. can type ALT-f (in one keystroke) to go forward one word, instead of
  81. ESC-f, which requires two.
  82.  
  83.    CHANGE_FONT -- This allows you to set the font used by the Amiga
  84. console device driver when it draws characters in the MG window.
  85. For instance, this lets you use a slightly taller font for editing
  86. when using interlace mode under 1.2.  MG cannot handle proportionally
  87. spaced fonts, but will allow you to use them (with rather confusing
  88. results) if you really want to.
  89.  
  90.    MODE_RENDITION, {TEXT,MODE}_{FG,BG} -- These are #defines that
  91. determine the default rendition of the mode line and the foreground
  92. and background colors of the text. See the COLOR section for more
  93. info.
  94.  
  95.    CHANGE_COLOR -- If you want to be able to mess around with the
  96. foreground and background colors of the text window, this option
  97. allows you to do that. You can also specify the way the status line is
  98. rendered (plain, boldface, italics, or reverse video).
  99.  
  100.    USE_ARP -- Amiga MG2a uses a few functions which are part of the
  101. library for ARP, the AmigaDOS Replacement Project. Work-alikes for
  102. these routines are provided for those without a copy of arp.library,
  103. but as a future version of Amiga MG will require ARP and it has so
  104. many other redeeming values, it is recommended you obtain a copy.
  105.  
  106.    DO_ICONIFY -- This turns on the ``amiga-iconify'' function,
  107. described in more detail below.
  108.  
  109.                               THE MOUSE
  110.                               ---------
  111.  
  112.    The Amiga Mouse can invoke no less than 24 different functions.
  113. Mouse clicks are essentially treated as keys by the MG, even though you
  114. click the mouse and hold down qualifier keys to get them. 
  115.  
  116.    Mouse keys come in three groups of eight, the groups being:
  117.     Mouse keys        -- when clicked in the text of a window
  118.     Mode-Mouse keys        -- when clicked on a window's mode line
  119.     Echo-Mouse keys        -- when clicked in the echo area
  120.  
  121.    Inside each group, which of the eight keys you get is determined by
  122. the combination of Shift, CTRL and ALT keys you are holding down when
  123. the mouse button is pressed. So yes, there really is a
  124. Ctrl-Meta-Shift-Mode-Mouse button.  Note that the Meta (M-) prefix
  125. *MUST* be the ALT key. Prefixing a mouse click with ESC will not work. 
  126.  
  127.    Mouse keys are generally bound to functions that affect the text in
  128. the selected buffer. If the Intuition mouse pointer is located inside an
  129. MG text window (i.e. an area where text is being edited), then a Mouse
  130. key is sent to the editor when you click the mouse. The buffer
  131. associated wth the window the pointer is in is made current, point is
  132. set as close as possible to the pointer (the character under the
  133. pointer, if possible), then the command bound to that mouse button is
  134. executed. 
  135.  
  136.    If the mouse pointer is in the mode line - the line that is in a
  137. different typeface (usually backlit, maybe black instead of white) --
  138. when the mouse button is clicked, a Mode-Mouse key is sent to the
  139. editor. The buffer that the selected status line is associated with is
  140. made the current buffer, the point is set to the value of point for
  141. that window, then whatever command is bound to that button is
  142. executed. Most of the Mode-Mouse keys invoke functions that act on the
  143. entire window or buffer.
  144.  
  145.    Clicking in the echo line - the line at the bottom of the screen
  146. where prompts and message appear - results in an Echo-Mouse key.
  147. Whatever command is bound to that button will be executed.  Since the
  148. echo line is not part of a buffer or a window, all the functions bound
  149. to Echo-Mouse keys affect the state of the editor as a whole.
  150.    
  151.    The default bindings for the hot mouse (as distributed) are:
  152.  
  153.  Qualifiers  |            Area clicked
  154.              |
  155. C  A  Shift  |    Text window        Mode line    Echo line
  156. -------------+---------------------------------------------------------
  157.          |    dot to mouse        forward page    switch to other buffer 
  158.       X         |    recenter        backward page    kill buffer
  159.    X         |    delete word        split window    describe key
  160.    X  X         |    kill line        delete window    describe bindings
  161. X         |    delete char        goto bob    suspend MG
  162. X     X         |    delete whitespace    goto eob    quit
  163. X  X         |    kill region        enlarge window    list buffers
  164. X  X  X         |    yank            shrink window    toggle Intuition window
  165.  
  166.    To help keep straight what the various keys do, notice that the
  167. Status and Echo groups come in pairs; the shifted version of a key is in
  168. some sense the opposite of the unshifted version. There is no opposite
  169. for display-buffers, so that key is bound to "amiga-toggle-border",
  170. which toggles MG' Intuition window between bordered and borderless. 
  171.  
  172.    Like any MG key, you are free to rebind the 24 mouse buttons to do
  173. whatever you wish.  You may even rebind them in your startup sequence.
  174. NOTE: only functions that start with the prefix "mouse-" are able to
  175. handle clicks in windows and mode lines, because they know how to figure
  176. out where the mouse was clicked. Conversely, any non-mouse function may
  177. be bound to an Echo-Mouse key, because clicking in the echo area does
  178. not send the x,y click information to the function.
  179.  
  180.    If the iconification code is compiled in, then Echo-Mouse is bound
  181. to ``amiga-iconify'' by default.
  182.  
  183.                THE KEYBOARD
  184.                ------------
  185.  
  186.    There is a shortcut for many of the Meta commands (usually indicated
  187. by the ESC character): hold down the ALT key at the same time you type
  188. what usually comes after the ESC. 
  189.  
  190.    Historically, this is why keys that are typed with ESC in front of
  191. them are called META keys; on the terminals at MIT where the Emacs
  192. editor (MG's spiritual parent) was originally written, there was a META
  193. key on the keyboard that did what the ALT key does. However, not many
  194. terminals outside of MIT have the META key at all, so the ESC key was
  195. nominated as a way to tell the system that the next character should be
  196. converted into a META key before it is interpreted. 
  197.  
  198.    MG also recognizes Amiga function keys.  For quick help on a key,
  199. type the HELP key and then the key you want help on. The following
  200. commands are bound to the Amiga function keys:
  201.  
  202.     Key            Function
  203.     --------------------------------------------
  204.     Help            describe-key-briefly
  205.  
  206.     Left            backward-char
  207.     Shift-Left        backward-word
  208.     Right            forward-char
  209.     Shift-Right        forward-word
  210.  
  211.     Up            previous-line
  212.     Shift-Up        backward-paragraph
  213.  
  214.     Down            next-line
  215.     Shift-Down        forward-paragraph
  216.  
  217.     F1            find-file
  218.     Shift-F1        find-file-other-window
  219.     F2            save-buffer
  220.     Shift-F2        write-file
  221.     F3            scroll-up (page down)
  222.     Shift-F3        scroll-down (page up)
  223.     F4            enlarge-window
  224.     Shift-F4        shrink-window
  225.     F5            fill-paragraph
  226.     Shift-F5        query-replace
  227.     F6            split-window-vertically
  228.     Shift-F6        delete-other-windows
  229.     F7            transpose-chars
  230.     Shift-F7        just-one-space
  231.     F8            start-kbd-macro
  232.     Shift-F8        end-kbd-macro
  233.     F9            call-last-kbd-macro
  234.     Shift-F9        describe-bindings
  235.     F10            list-buffers
  236.     Shift-F10        save-buffers-kill-emacs
  237.  
  238.               FUNCTION KEY NAMES
  239.               ------------------
  240.  
  241. On the Amiga, all the function keys are readily visible on the
  242. keyboard, so this table of key names for use in strings is fairly
  243. self-explanitory.  If you want to rebind Shift-Down-Arrow to scroll-up
  244. (move down a whole page), for example, insert the line
  245.  
  246.     (global-set-key "\F5" 'scroll-up)
  247.  
  248. in your s:.mg file.
  249.     Amiga key            Startup name
  250. -------------------------------------------------------------------------
  251.     Up-Arrow            \F0
  252.     Down-Arrow            \F1
  253.     Left-Arrow            \F2
  254.     Right-Arrow            \F3
  255.  
  256.     Shift-Up-Arrow            \F4
  257.     Shift-Down-Arrow        \F5
  258.     Shift-Left-Arrow        \F6
  259.     Shift-Right-Arrow        \F7
  260.  
  261.     Help                \F9
  262.  
  263.     F1                \F12
  264.     F2                \F13
  265.     F3                \F14
  266.     F4                \F15
  267.     F5                \F16
  268.     F6                \F17
  269.     F7                \F18
  270.     F8                \F19
  271.     F9                \F20
  272.     F10                \F21
  273.  
  274.     Shift-F1            \F22
  275.     Shift-F2            \F23
  276.     Shift-F3            \F24
  277.     Shift-F4            \F25
  278.     Shift-F5            \F26
  279.     Shift-F6            \F27
  280.     Shift-F7            \F28
  281.     Shift-F8            \F29
  282.     Shift-F9            \F30
  283.     Shift-F10            \F31
  284.  
  285.     Mouse                \F32
  286.     Ctrl-Mouse            \F33
  287.     Shift-Mouse            \F34
  288.     Shift-Ctrl-Mouse        \F35
  289.     Meta-Mouse            \F36
  290.     Meta-Ctrl-Mouse            \F37
  291.     Meta-Shift-Mouse        \F38
  292.     Meta-Shift-Ctrl-Mouse        \F39
  293.  
  294.     Mode-Mouse            \F40
  295.     Ctrl-Mode-Mouse            \F41
  296.     Shift-Mode-Mouse        \F42
  297.     Shift-Ctrl-Mode-Mouse        \F43
  298.     Meta-Mode-Mouse            \F44
  299.     Meta-Ctrl-Mode-Mouse        \F45
  300.     Meta-Shift-Mode-Mouse        \F46
  301.     Meta-Shift-Ctrl-Mode-Mouse    \F47
  302.  
  303.     Echo-Mouse            \F48
  304.     Ctrl-Echo-Mouse            \F49
  305.     Shift-Echo-Mouse        \F50
  306.     Shift-Ctrl-Echo-Mouse        \F51
  307.     Meta-Echo-Mouse            \F52
  308.     Meta-Ctrl-Echo-Mouse        \F53
  309.     Meta-Shift-Echo-Mouse        \F54
  310.     Meta-Shift-Ctrl-Echo-Mouse    \F55
  311.  
  312.  
  313.                  THE MENU
  314.                  --------
  315.    If the menu option is compiled into the program, you can also use the
  316. Intuition menu, just like any other well-written Amiga program. The menu
  317. names are relatively self-explanitory, as are the names inside each
  318. menu. If you want to learn what the command key is for a menu function,
  319. use the command "apropos" (invoked by Ctrl-Backspace a), followed by a
  320. substring of the menu item you're curious about. 
  321.  
  322.                 THE BROWSER
  323.                 -----------
  324.  
  325.    The Browser is the next best (or even better, for some purposes)
  326. thing to a file requester. Simply put, it places the directory tree up
  327. in the menu bar, where you can visit files simply by selecting their
  328. names from the menu bar. Try it, you'll like it.  If the MENU option is
  329. also compiled in, the editing menus are all submenus of the first,
  330. "Edit" menu, and the Browser uses the rest of the menu bar.
  331.  
  332.                WINDOW OPTIONS 
  333.                --------------
  334.  
  335.    As a service to those of us who want a full-size, 80-column editing
  336. window on a 640x200 screen, Amiga MG allows you to make its window
  337. borderless. If you like, you can take over the full Workbench screen (48
  338. rows, 80 columns in interlace mode under 1.2). Borderless windows can be
  339. "visually confusing", to quote the author of Intuition, so it's probably
  340. best to either to 1) take over the whole screen or 2) put the MG window
  341. at the bottom of the screen. 
  342.  
  343.    When Amiga MG starts up on a 640x200 screen, its initial window is
  344. borderless, and 640x200 pixels in dimension. To change to a resizeable
  345. window, issue the command "M-x amiga-toggle-border" or select the
  346. "Toggle Window" subitem from the "Window" menu (if it is compiled into
  347. the program).  MG will create a new, resizeable, bordered window, which
  348. you can then set to whatever size you wish using the sizing gadget in
  349. the bottom left corner of the window. 
  350.  
  351.    To go back to a borderless window, issue the "Toggle Window" command
  352. again. MG will remember the current size of the resizeable window, and
  353. create a borderless window with the same dimensions and position. Since
  354. under Workbench 1.2 you can use a 640x400 window, this lets you take up
  355. the entire screen, 48 rows by 80 columns. 
  356.  
  357. If you use MoreRows, MG will open up a resizeable window if there's
  358. enough room on the screen for an 24 line by 80 column window.
  359.  
  360.  
  361.                CHANGING THE WINDOW'S FONT
  362.                --------------------------
  363.  
  364.    There may be times when you'd like to use another font on the screen,
  365. either to make the text easier to read, or for some special effect, like
  366. editing something on a TV projection system.  MG lets you change the
  367. font that is used to draw characters in the window, using the command
  368. "M-x amiga-set-font".
  369.  
  370.    You can use the universal argument to set the desired text font size,
  371. for example saying "C-u 12 M-x set-font", then typing "opal" when it
  372. prompts you for the name of the font.  If you give an argument that is
  373. less than 0, MG resets the window's font to the system default (set by
  374. Preferences).  If you don't give an argument, MG prompts you for the
  375. desired font size.
  376.  
  377.    Changing the window's font to one that is designed to be
  378. proportionally spaced does not work very well, because MG expects the
  379. all characters on the screen to be the same width, which is of course
  380. not the case with proportional fonts.  MG lets you use proportional
  381. fonts, but it asks you to make sure first.
  382.  
  383.  
  384.                 TEXT RENDITION
  385.                 --------------
  386.  
  387.    If you really want to, you can change the "soft style" the console
  388. device uses to draw characters in the text area and the mode line.  The
  389. possible values for these styles are:
  390.  
  391.     0    plain
  392.     1    boldface
  393.     3    italic
  394.     4    underline
  395.     7    inverse
  396.  
  397.    About the only useful values are the ones for plain, boldface or
  398. italics. The default value for text is 0 (plain, of course), while the
  399. default for the mode line is 7 (inverse video). These can be changed by
  400. the appropriate #definitions of MODE_RENDITION and TEXT_RENDITION. 
  401.  
  402.    The commands to change the rendition values are:
  403.  
  404.     amiga-text-rendition
  405.         Set text area rendition
  406.     amiga-mode-rendition
  407.         Set mode line rendition (this is by far the more useful)
  408.  
  409.                 COLOR
  410.                 -----
  411.  
  412.    You can set the colors the console device uses to draw the text you
  413. are editing. (This does not mean that you can specify *any* color; your
  414. choices are limited to the colors being used by Intuition to maintain
  415. the Workbench screen.) The commands that control this behavior are:
  416.  
  417.     amiga-text-foreground
  418.         Sets the color used to draw the characters you see in the
  419.         text area (distinct from the mode line area for each window).
  420.         Accepts a number from 0 to 7.  The value initially used is 1.
  421.         You can get a reverse video screen by selecting 0 for this
  422.         value and 1 for the background color
  423.  
  424.     amiga-text-background
  425.         Sets the color used the draw the background behind characters
  426.         in the text area.  Accepts the same values as
  427.         amiga-text-foreground.  The initial value is 0.
  428.  
  429.     amiga-mode-foreground
  430.         Sets the foreground color used by the mode line.  If you
  431.         set this to 0 and the background color to 1, you can get
  432.         a reverse video mode line even when you select italics for
  433.         the mode line rendition (see RENDITION)
  434.  
  435.     amiga-mode-background
  436.         Sets the background color for the mode line.  You should
  437.         get the idea by now.
  438.  
  439.                 ICONIFICATION
  440.                 -------------
  441.  
  442.    Leo Schwab wrote a set of very general routines for allowing an
  443. Amiga program to shrink its window to an icon.  This icon can then be
  444. moved around on the screen, and re-expanded to its full size by a
  445. double click, like the one used to open a drawer.  Amiga MG2a
  446. provides this capability through the function ``amiga-iconify'',
  447. which is bound to Echo-Mouse by default if the iconification code is
  448. present.  Not only is this a great way to prevent screen clutter, but
  449. it also frees 50K of CHIP RAM while MG's window is iconified (on a 30
  450. line by 80 column mg window).
  451.  
  452.    To iconify the window, click the mouse in MG's echo line or issue
  453. the extended command ``amiga-iconify.''  To expand MG's window back
  454. to its full size, double-click on the MG2a icon in the same way you
  455. would on a disk or drawer icon.  The icon can also be dragged
  456. about, and will remember its last position when the window is
  457. iconified again.
  458.         
  459.  
  460.                 FUNCTION LIST
  461.                 -------------
  462.  
  463.    For completeness, here is a list of all Amiga MG functions that are
  464. specific to the Amiga. 
  465.  
  466. amiga-iconify
  467.     Iconifies the Amiga MG window.
  468. amiga-menu
  469.     The entry point for using MG's Intuition menu.  This function
  470.     figures out which menu selection was used, then calls the
  471.     appropriate function by name (not hard-coded key value)
  472. amiga-mouse
  473.     Set dot to where the mouse is pointing.  Two clicks in the same
  474.     spot set the mark too.
  475. mouse-*
  476.     Functions that first either 1) move point to where the mouse
  477.     points to or 2) select the buffer associated with the mode line
  478.     the mouse clicked in, then call the function indicated by the
  479.     rest of the name.  These functions are all "bound" to various
  480.     mouse click keys.
  481. amiga-set-font
  482.     Set the font used to draw characters inside the MG window.
  483.     A positive argument is used for the size of the font, while
  484.     a nonpositive argument requests that the font be set to the
  485.     system default font.  Menu items are not affected by this command.
  486. amiga-mode-rendition
  487. amiga-text-rendition
  488.     Set the way your text (or the mode line) is rendered.  Choose
  489.     from 0 (plain), 1 (bold), 3 (italic), 4 (underline), or
  490.     7 (reverse video). 0, 1, and 3 are about the only really useful
  491.     ones for text; 7 is the default for the mode line.
  492. amiga-text-foreground
  493. amiga-text-background
  494. amiga-mode-foreground
  495. amiga-mode-background
  496.     Set the system color used to draw the characters in the text area
  497.     and mode line.  Accepts a value between 0 and 7; the default for
  498.     the background is 0, the default for the text is 1.
  499. amiga-toggle-border
  500.     Switch your window between resizable and borderless. Lets you
  501.     take over the whole screen (80 columns! 48 lines in interlace!)
  502.